<?php
/* SVN FILE: $Id: calendar.php 324 2010-07-16 11:58:32Z gregory.rome $ */
/**
 * Model.
 *
 * @todo Add file description.
 *
 * cBBweb : Digital Blood Bowl league interface (http://code.google.com/p/cbbweb/)
 * Copyright 2009-2010, Grégory Romé.
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright     Copyright 2009-2010, Grégory Romé.
 * @link          http://code.google.com/p/cbbweb/ cBBweb Project
 * @package       cbbweb
 * @subpackage    cbbweb.models
 * @version       $Revision: 324 $
 * @modifiedby    $LastChangedBy: gregory.rome $
 * @lastmodified  $Date: 2010-07-16 11:58:32 +0000 (Fri, 16 Jul 2010) $
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
 */


/*
CREATE TABLE Calendar (
	ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
	idTeam_Listing_Away INTEGER ,
	idTeam_Listing_Home INTEGER ,
	Championship_iSeason INTEGER ,
	Championship_iDay INTEGER ,
	Championship_iGroup INTEGER ,
	Championship_idRule_Types INTEGER ,
	Championship_iEliminitationLevel INTEGER ,
	Playoff_iEliminationLevel INTEGER ,
	Playoff_bAwayGame INTEGER ,
	Away_iScore INTEGER ,
	Away_iReward INTEGER ,
	Away_iCashEarned INTEGER ,
	Away_iPossessionBall INTEGER ,
	Away_Occupation_iOwn INTEGER ,
	Away_Occupation_iTheir INTEGER ,
	Away_iMVP INTEGER ,
	Away_Inflicted_iPasses INTEGER ,
	Away_Inflicted_iCatches INTEGER ,
	Away_Inflicted_iInterceptions INTEGER ,
	Away_Inflicted_iTouchdowns INTEGER ,
	Away_Inflicted_iCasualties INTEGER ,
	Away_Inflicted_iTackles INTEGER ,
	Away_Inflicted_iKO INTEGER ,
	Away_Inflicted_iInjuries INTEGER ,
	Away_Inflicted_iDead INTEGER ,
	Away_Inflicted_iMetersRunning INTEGER ,
	Away_Inflicted_iMetersPassing INTEGER ,
	Away_Sustained_iPasses INTEGER ,
	Away_Sustained_iCatches INTEGER ,
	Away_Sustained_iInterceptions INTEGER ,
	Away_Sustained_iTouchdowns INTEGER ,
	Away_Sustained_iCasualties INTEGER ,
	Away_Sustained_iTackles INTEGER ,
	Away_Sustained_iKO INTEGER ,
	Away_Sustained_iInjuries INTEGER ,
	Away_Sustained_iDead INTEGER ,
	Away_Sustained_iMetersRunning INTEGER ,
	Away_Sustained_iMetersPassing INTEGER ,
	Away_iMetersRunning INTEGER ,
	Away_iMetersPassing INTEGER ,
	Home_iScore INTEGER ,
	Home_iReward INTEGER ,
	Home_iCashEarned INTEGER ,
	Home_iPossessionBall INTEGER ,
	Home_Occupation_iOwn INTEGER ,
	Home_Occupation_iTheir INTEGER ,
	Home_iMVP INTEGER ,
	Home_Inflicted_iPasses INTEGER ,
	Home_Inflicted_iCatches INTEGER ,
	Home_Inflicted_iInterceptions INTEGER ,
	Home_Inflicted_iTouchdowns INTEGER ,
	Home_Inflicted_iCasualties INTEGER ,
	Home_Inflicted_iTackles INTEGER ,
	Home_Inflicted_iKO INTEGER ,
	Home_Inflicted_iInjuries INTEGER ,
	Home_Inflicted_iDead INTEGER ,
	Home_Inflicted_iMetersRunning INTEGER ,
	Home_Inflicted_iMetersPassing INTEGER ,
	Home_Sustained_iPasses INTEGER ,
	Home_Sustained_iCatches INTEGER ,
	Home_Sustained_iInterceptions INTEGER ,
	Home_Sustained_iTouchdowns INTEGER ,
	Home_Sustained_iCasualties INTEGER ,
	Home_Sustained_iTackles INTEGER ,
	Home_Sustained_iKO INTEGER ,
	Home_Sustained_iInjuries INTEGER ,
	Home_Sustained_iDead INTEGER ,
	Home_Sustained_iMetersRunning INTEGER ,
	Home_Sustained_iMetersPassing INTEGER ,
	Home_iMetersRunning INTEGER ,
	Home_iMetersPassing INTEGER ,
	iSpectators INTEGER ,
	iRating INTEGER ,
	bPlayed INTEGER,
	idRule_Listing INTEGER
);
 */
/**
 * Model.
 *
 * @todo Add model description.
 *
 * @package       cbbweb
 * @subpackage    cbbweb.controllers
 */
class Calendar extends AppModel {

	var $name = 'Calendar';
	var $primaryKey = 'ID';
	var $useTable = 'calendar';

	var $belongsTo = array(
		'TeamAway' => array(
			'className' => 'Team',
			'foreignKey' => 'idTeam_Listing_Away'
		),
		'TeamHome' => array(
			'className' => 'Team',
			'foreignKey' => 'idTeam_Listing_Home'
		),
		'Championship' => array(
			'className' => 'Championship',
			'foreignKey' => 'idRule_Listing'
		),
	);
}
?>